#ifndef BASEOBJECT_H
#define BASEOBJECT_H

#include <GameGlobals.h>

#include <Transform.h>
#include <ObjectProperties.h>
struct RenderObject;
struct PhysicsObject;

#include <string>

class BaseObject
{
	friend class ObjectManager;
	friend class PlayerInterface;
	public:

		BaseObject():gfx(0),phys(0){}
		virtual ~BaseObject(){}

		virtual std::string GetTypeName() = 0;
		virtual std::string GetTextName() = 0;
		virtual void Update(float dt) = 0;
		virtual void DoCollision(BaseObject* objectCollidedWith){}//by default, no action on a collision
		
		void SetColor(float r, float g, float b, float a = 1.0f);
		void SetPosition(vec2 pos);
		void SyncTransformToPhysics();
		void SetSleepState(truth canSleep);

		Transform t;
		ObjectProperties prop;
		vec2 direction;
		vec2 velocity;

	protected:

		RenderObject* gfx;
		PhysicsObject* phys;

};


#endif